package com.zhao.util;


import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @Author:zhao
 * @Date: 2018/8/26 11:49
 * @Description:
 */
public class FileUtil {

    /**
     * 写文件
     * @param fileName
     * @param body
     */
    public static void write(String fileName,String body) {
        try {
            BufferedWriter out = new BufferedWriter(new FileWriter(fileName));
            out.write(body);
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
